﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;

namespace Viewer.BaoCao.UserControls
{
    public partial class UCTinhHinhTangLuong : System.Web.UI.UserControl
    {
        BusinessObject.BusinessEntities.NSNhanVien nhanvien = new Viewer.BusinessObject.BusinessEntities.NSNhanVien();
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [DirectMethod]
        public void ShowDialogTinhHinhTangLuong(int nodeId)
        {
            txtMonth.Text = string.Empty;
            hdNodeIdToChuc.Text = nodeId.ToString();
            wdTinhHinhTangLuong.Show();
        }
        protected void BtnSearchTangLuong_Click(object sender, DirectEventArgs e)
        {
            int month = !string.IsNullOrEmpty(txtMonth.Text) ? Convert.ToInt32(txtMonth.Text) : 0;
            storeNhanVienTangLuong.DataSource = nhanvien.ReturnMonthCountForTangLuong(Convert.ToInt32(hdNodeIdToChuc.Text), month);
            storeNhanVienTangLuong.DataBind();
            //string sMessage = "No records found. Please try again with different criterion.";
            X.Mask.Hide();
        }
    }
}